void createHist()
{
    TFile* file = new TFile("NeutronInDME.root");
    TTree* tree = (TTree*)file->Get("MCData");


    ROOT::RDataFrame data("MCData", "NeutronInDME.root", {"PassEng"});
    auto maxE = data.Max<double>("PassEng");
    auto hist = data.Histo1D<double>({"NeutronEkin", "", 200, 0., double(*maxE)}, "PassEng");

    TFile *outfile = new TFile("NeutronKineticEnergy.root", "RECREATE");
    outfile->cd();
    hist->Write();
    outfile->Close();

}